package com.example.autoconfig;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 配置类属性
 */
//@Component //如果这里添加了注解那么在自动配置类(HelloAutoConfig)的时候就不用添加
// @enableConfigurationProperties(HelloProperties.class)注解.
@ConfigurationProperties(prefix = "hello")
public class HelloProperties {

    private String msg = "default";

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
